/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.suarte.core.service.impl;

import com.suarte.core.Company;
import com.suarte.core.Contact;
import com.suarte.core.dao.ContactDao;
import com.suarte.core.service.ContactManager;
import org.appfuse.service.impl.GenericManagerImpl;

import java.util.List;

/**
 * @date   Dec 20, 2010
 * @author Ggutierrez
 */
public class ContactManagerImpl extends GenericManagerImpl<Contact, Long> implements ContactManager {
    ContactDao contactDao;

    public ContactManagerImpl(ContactDao contactDao) {
        super(contactDao);
        this.contactDao = contactDao;
    }

    public List<Contact> findByNames(String firstName, String lastName) {
        return contactDao.findByNames(firstName, lastName);
    }

    public List<Contact> findByCompany(Company company) {
        return contactDao.findByCompany(company);
    }

    public List<Contact> findContacts() {
        return contactDao.findContacts();
    }
}
